package com.mobileClientKernel.android.reactNative.manager;

import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.core.DeviceEventManagerModule;

public class JJRNManager {

    public ReactContext reactContext = null;

    private static JJRNManager instance = new JJRNManager();
    public static JJRNManager getInstance() {
        return instance;
    }

    public void sendEventToRnWithName(String eventName, String args) {
        this.getReactContext().getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
                .emit(eventName, args);
    }

    public ReactContext getReactContext() {
        return reactContext;
    }

    public void setReactContext(ReactContext reactContext) {
        this.reactContext = reactContext;
    }
}
